How to: Add trendlines to a data series in Excel.
Solution:
Select the desired data series. Select 'Trendline...' from the 'Insert' menu. Select the desired trend type and type a name for the trendline. Select other options as necessary.
1) Select the chart that contains the data series to which to add a trendline:
a) If the chart is embedded on the worksheet, double-click on the chart. (A striped border with handles appears around the chart.)
b) If the chart is on a separate chart sheet, click the tab for the chart sheet.
2) Select (click once on) the desired data series.
3) Select the 'Insert' menu and select 'Trendline...'. (The Trendline dialog box appears.)
Trendline dialog box
4) Click 'Type'.
5) Select the desired trend type from the 'Trend/Regression Type' group.
NOTE: For a polynomial, specify the highest power for independent variable in the 'Order' box. Make sure that the value is an integer between 2 and 6. For a moving average, specify the number of periods on which the moving average is based in the 'Period' box.
6) Click 'Options'.
7) Do one of the following:
a) Select the 'Automatic' radio button to accept the name that Excel creates for the trendline.
b) Select the 'Custom' radio button and type a desired name in the box next to the 'Custom' radio button.
Custom button
8) (Optional) Type the number of periods forward or backward for trend forecast in the 'Forecast' group.
Forecast group
9) (Optional) Select the 'Set Intercept =' check box and type a number in the box to the right to adjust the point where the trendline should meet the y axis.
Set Intercept= box
NOTE: This option is available for linear, polynomial, and exponential trendlines. It does not apply to logarithmic, power, and moving average trendlines.
10) (Optional) Select the 'Display Equation on Chart' check box to display the regression equation in the chart.
NOTE: The equation can be formatted or moved.
11) (Optional) Select the 'Display R-squared Value on Chart' check box to display the R-squared value in the chart.
NOTE: The value can be formatted or moved.
12) Click 'OK'. (A trendline appears on the chart. )
trendline